package com.yuan.consumer.controller;

import com.yuan.common.entity.UserAddress;
import com.yuan.common.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @DubboReference
    UserService userService;
    @GetMapping("/getUserAddress")
    public String getUserAddress(Integer id) {
        UserAddress userAddress = userService.getById(id);
        return userAddress.getUserName();
    }
}
